// pages/testsql/testsql.js
var zm = require('../../utils/zm_tools.js')
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },
  CreateTab: function (options) {
    console.log(options);
    zm.post("/testsql", { action: "test" }, function (r) {
      console.log(r);

    });
    zm.get("/demo", { action: "create" }, function (r) {
      console.log(r);

    });

  },
  InsertRow:function (o){
    console.log("InsertRow",o);
    zm.post("/testsql", { name: "damengge", action: "insert" }, function (r) {
      console.log(r);

    });
  },
  Select: function (options) {
    console.log(options);
    zm.post("/testsql", { name: "test", action: "select" }, function (r) {
      console.log(r);
    });
  },
  Update: function (options) {
    console.log(options);
    zm.post("/testsql", { name: "test", action: "update" }, function (r) {
      console.log(r);
    });
  },
  Delete: function (options) {
    console.log(options);
    zm.post("/testsql", { name: "test", action: "del" }, function (r) {
      console.log(r);
    });
  }
})